import { legacy_createStore as createStore} from 'redux'

const initState = {
  count: 0
}

function reducer(state = initState, action: {type: string}) {
  switch (action.type) {
  case 'INCREMENT':
    return {
      count: state.count + 1
    }
  default:
    return state;
  }
}


export default createStore(reducer)